//import 'package:WebTest/douban/pages/main/main.dart';
//import 'package:flutter/material.dart';
//
//void main() => runApp(MyApp());
//
//class MyApp extends StatelessWidget {
//  @override
//  Widget build(BuildContext context) {
//    return MaterialApp(
//      debugShowCheckedModeBanner: false,
//      title: 'Material App',
//      home: XJMainScreen(),
//      theme: ThemeData(
//        primaryColor: Colors.lightBlue,
////        取消水泼纹
//        splashColor: Colors.transparent,
//        highlightColor: Colors.transparent,
//      ),
//    );
//  }
//}
//
//

import 'package:flutter/material.dart';

void main() {
  runApp(
      MyApp()
    /*
    * 1.先创建自己要共享的数据
    * 2.在我们应用程序的顶层ChangeNotifierProvider
    * 3.在其他位置使用共享数据*/
//    ChangeNotifierProvider(
//      child: MyApp(),
//      create: ,
//    )
  );
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Material App Bar'),
        ),
        body: Center(
          child: HomePage(),
        ),
      ),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        HYShowData01(),
        HYShowData02(),
      ],
    );
  }
}

class HYShowData01 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Text("当前计数：100",style: TextStyle(fontSize: 30),),
      color: Colors.lightBlue,
    );
  }
}

class HYShowData02 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Text("当前计数：100",style: TextStyle(fontSize: 30),),
      color: Colors.red,
    );
  }
}

class HomeContent extends StatefulWidget {
  @override
  _HomeContentState createState() => _HomeContentState();
}

class _HomeContentState extends State<HomeContent> {
  @override
  Widget build(BuildContext context) {
    return Container();
  }
}


